#define _CRT_SECURE_NO_WARNINGS 1
int minNumberInRotateArray(int* rotateArray, int rotateArrayLen) {
    int left = 0;
    int right = rotateArrayLen - 1;
    while (left < right)
    {
        int mid = (left + right) / 2;
        if (rotateArray[mid] < rotateArray[right])
        {
            right = mid;
        }
        else if (rotateArray[mid] > rotateArray[right])
        {
            left = mid + 1;
        }
        else {
            right--;
        }
    }
    return rotateArray[left];
}